<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>图片管理</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../style/bootstrap.css" />
<link rel="stylesheet" href="style/index.css" />
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<h1 class="page-header">
					图片管理
					<c:if test="${pictures==null}">
						<small>添加图片</small>
					</c:if>
					<c:if test="${not empty pictures}">
						<small>编辑图片</small>
					</c:if>
				</h1>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<!-- 用户列表--bootstrap高级表格使用 -->
				<div class="panel panel-default">
					<c:if test="${pictures==null}">
						<div class="panel-heading">添加图片</div>
					</c:if>
					<c:if test="${not empty pictures}">
						<div class="panel-heading">编辑图片</div>
					</c:if>
					<div class="panel-body">
						<form action="/admin/PicturesServlet" method="post" enctype="multipart/form-data">
							<input type="hidden" name="id" value="${pictures.id}">
							<div class="form-group">
								<label for="picType">图片类型</label> 
								<select id="picType"
									name="picType" class="form-control">
									<option value="0">商品</option>
									<option value="1">广告</option>
									<option value="2">巨屏</option>
								</select>
							</div>
							<div class="form-group">
								<label for="picUrl">图片路径</label> 
								<input type="file"
									name="picUrl" value="${pictures.picUrl}" class="form-control"
									id="picUrl">
							</div>
							<div class="form-group">
								<label for="picDesc">图片描述</label>
								<textarea id="picDesc" name="picDesc" class="form-control"
									rows="3">${pictures.picDesc}</textarea>
							</div>

							<button type="submit" class="btn btn-success">保存</button>
							<button type="reset" class="btn btn-info">重置</button>
						</form>
					</div>
				</div>
			</div>
			<!--表格结束 -->
		</div>
	</div>
</body>
</html>